#include<stdio.h>
#include<math.h>
int main()
{
	int n,renum = 0;
	scanf("%d",&n);
	while(n)
	{
		renum = renum*10 + n % 10;        
		n /= 10;
	}
	printf("%d",renum);	
	return 0;
 } 
 // renum             n 
 //   0              1396
 //   6              139
 //60 + 9 = 69       13
 //690 + 3 = 693     1
 //6930 + 1 = 6931 
